import React, {useEffect} from 'react';
import SChart from 'schart.js';

const SCharts = (props) => {

    const {canvasId,options} = props;

    const handleInitChart = () => {
        new SChart(canvasId, options);
    }

    useEffect(()=>{
        handleInitChart()
    },[])
    return (<canvas id={canvasId}></canvas>)
}

export default SCharts;